export const studentFormConfig = {
  userRole: 2,
  // 下拉框的选项，isFuzzyQuery是否为模糊查询选项
  selectOptions: [
    { label: '姓名', value: 'name', isFuzzyQuery: true },
    { label: '学号', value: 'stu_num' },
    { label: '专业', value: 'major', isFuzzyQuery: true },
    { label: '学院', value: 'college', isFuzzyQuery: true }
  ],
  btnOptions: [
    { text: '添加', icon: 'EditPen' },
    { text: '上传', icon: 'Upload' },
    { text: '导出', icon: 'Download' }
  ]
}

// table表格配置
export const studentTableProps = {
  userRole: 2,
  tableColumnProps: [
    { prop: 'avatar', label: '头像', width: 100, slotName: 'avatar' },
    { prop: 'stu_num', label: '学号', width: 120, slotName: 'stu_num' },
    { prop: 'name', label: '姓名', width: 120 },
    { prop: 'college', label: '学院', width: 140 },
    { prop: 'major', label: '专业', width: 150 },
    { prop: 'class', label: '班级', width: 150 },
    // { prop: 'admission_date', label: '入学日期', width: 130 },
    { prop: 'gender', label: '性别', width: 70 },
    // { prop: 'level', label: '层级', width: 80 },
    { prop: 'role', label: '角色', width: 100, slotName: 'role' },
    { prop: 'state', label: '状态', width: 100, slotName: 'state' },
    { prop: 'handle', label: '操作', width: 150, slotName: 'handle' }
  ]
}

// 对话框配置
export const studentModelConfig = {
  userRole: 2,
  formItems: [
    {
      field: 'name',
      type: 'input',
      label: '真实姓名',
      placeholder: '请输入真实姓名',
      rules: [{ required: true, message: '姓名不能为空!', trigger: 'blur' }]
    },
    {
      field: 'stu_num',
      type: 'input',
      label: '学生学号',
      placeholder: '请输入学生学号',
      noChinese: true,
      rules: [{ required: true, message: '学号不能为空!', trigger: 'blur' }]
    },
    {
      field: 'admission_date',
      type: 'datepicker',
      label: '入学日期',
      placeholder: '请输入日期',
      rules: [{ required: true, message: '入学日期不能为空!', trigger: 'blur' }]
    },
    {
      field: 'phone',
      type: 'input',
      label: '手机号码',
      noChinese: true,
      placeholder: '请输入手机号码',
    },
    {
      field: 'email',
      type: 'input',
      label: '电子邮箱',
      noChinese: true,
      placeholder: '请输入电子邮箱'
    },
    {
      field: 'level',
      type: 'select',
      label: '学生层次',
      placeholder: '请选择层次',
      options: [
        { title: '本科', value: '本科' },
        { title: '专科', value: '专科' }
      ],
      rules: [{ required: true, message: '用户性别不能为空!', trigger: 'blur' }]
    },
    {
      field: 'class',
      type: 'cascader',
      label: '所属班级',
      placeholder: '请输入班级',
      props: { expandTrigger: 'hover' },
      options: [],
      rules: [{ required: true, message: '所属班级不能为空!', trigger: 'blur' }]
    },
    {
      field: 'gender',
      type: 'select',
      label: '学生性别',
      placeholder: '请选择性别',
      options: [
        { title: '男', value: '男' },
        { title: '女', value: '女' }
      ],
      rules: [{ required: true, message: '用户性别不能为空!', trigger: 'blur' }]
    }
  ],
  labelWidth: '80px',
  colLayout: { span: 24 }
  // itemStyle: {}
}
